/*
 * @description  : 案由数据 service
 * @descriptionDetail: 一键搜 service
 * @copyright    : 浙江烟草
 * @author       : dw
 * @create       : 2022-10-09 22:21:21
 */
import {keySearchService,} from '../../sql/keySearch/searchServiceMixins';

const KeySearchService = {
  /**
	 * 保存数据到本地
	 * @param list
	 */
  saveIndexDBKeySearch(obj) {
    let arr = [];
    arr.push(obj);
    return keySearchService.savekeySearchInfoDb(arr);
  },

  /**
	 * 清空一键搜
	 * @returns {Promise<void>}
	 */
  clearKeySearch() {
    return keySearchService.clearkeySearchInfoDb();
  },
  /**
	 * 获取历史数据
	 * @param userId,type
	 * @returns {Promise<T>}
	 */
  getKeySearchData(userId,type) {
    return  keySearchService.getkeySearchInfoByCode(userId,type);
  },

}

export default KeySearchService;
